package com.bobi.ecofavor.controller;

import com.bobi.ecofavor.common.utils.JsonResponse;
import com.bobi.ecofavor.model.dto.StoreNameDto;
import com.bobi.ecofavor.service.StoreNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/userOilStoreName")
public class StoreNameController {
    @Autowired
    private StoreNameService storeNameService;

    @RequestMapping("/userId")
    public JsonResponse getOilNameById(Integer userid){
        List<StoreNameDto> store1 = storeNameService.getOilNameById(userid);
        return JsonResponse.success(store1);
    }

}
